{% comment %}
/* Copyright 2009 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
{% endcomment %}
{% extends 'admin_base.html' %}
{% block content %}
{% if confirmation %}
<div class="success">Update Completed!</div>
{% endif %}
<br><br>
<form method="POST">
  <input type="hidden" name="blog" value="{{blog.key}}">

    <h3 id="main">Main</h3>
    <div id="main-content">
      <div class="table">
        <div class="row">
          <div class="cell label">Site Name*:</div>
          <div class="cell input">
            <input
              class="text-input"
              type="text"
              name="name"
              value="{{blog.name}}">
            {% if warnings.name %}<br>
            <span class="warning">Your name should be a string.</span>
            {% endif %}
          </div>
        </div>
        <div class="row">
          <div class="cell label">Tagline:</div>
          <div class="cell input">
            <input
              class="text-input"
              type="text"
              name="tagline"
              value="{{blog.tagline}}">
              {% if warnings.tagline %}<br>
              <span class="warning">
                Your Tagline should be a string.
              </span>
              {% endif %}
          </div>
        </div>
        <div class="row">
          <div class="cell label">Button Name*:</div>
          <div class="cell input">
            <input
              class="text-input"
              type="text"
              name="button_name"
              value="{{blog.button_name}}">
              {% if warnings.button_name %}<br>
              <span class="warning">
                Your button name should be a string.</span>
              {% endif %}
          </div>
        </div>
        <div class="row">
          <div class="cell label">Links Title*:</div>
          <div class="cell input">
            <input
              class="text-input"
              type="text"
              name="link_title"
              value="{{blog.link_title}}">
              {% if warnings.link_title %}<br>
              <span class="warning">
                Your button name should be a string.</span>
              {% endif %} 
              (title for the links section)
          </div>
        </div>
      </div>
    </div>

    <!-- Meta //-->
    <h3 id="meta" class="animated-zippy">Meta</h3>
    <div id="meta-content">
      <div class="table">
        <div class="row">
          <div class="cell label">RSS Feed Path:</div>
          <div class="cell input">
            <input
              class="text-input"
              type="text"
              name="feed_path"
              value="{{blog.feed_path}}">
              {% if warnings.sitemap_path %}<br>
              <span class="warning">
                Your path should be a string.</span>
              {% endif %}
            <div>
              (Full URL to service such as
              <a 
              href="http://feedburner.google.com"
              target="_blank">Feedburner</a>
              - leave blank for default
              "&lt;yourdomain&gt;/sitemap.rss" 
              path to be used)
            </div>
          </div>
        </div>
        <div class="row">
          <div class="cell label">Canonical Url:</div>
          <div class="cell input">
            <input
              class="text-input"
              type="text"
              name="canonical"
              value="{{blog.canonical|default_if_none:""}}">
              {% if warnings.canonical %}<br>
              <span class="warning">
                Your canonical url should be a string.</span>
              {% endif %}
          </div>
        </div>
        <div class="row">
          <div class="cell label">Keywords:</div>
          <div class="cell input">
            <textarea name="keywords">{{blog.keywords}}</textarea>
              {% if warnings.keywords %}<br>
              <span class="warning">
                Your keywords should be a comma separated
                string.</span>
              {% endif %}
          </div>
        </div>
        <div class="row">
          <div class="cell label">Description:</div>
          <div class="cell input">
            <textarea name="description">{{blog.description}}</textarea>
              {% if warnings.description %}<br>
              <span class="warning">
                Your description should be a string.</span>
              {% endif %}
          </div>
        </div>
        <div class="row">
          <div class="cell label">NoIndex:</div>
          <div class="cell input">
            <input
              type="checkbox"
              name="noindex"
              {% if blog.noindex %}
              checked="true"
              {% endif %}
              value="true">
              {% if warnings.noindex %}<br>
              <span class="warning">
                Your managed to mess up checking an unrequired
                checkbox. How'd you do that?</span>
              {% endif %}
          </div>
        </div>
        <div class="row">
          <div class="cell label">NoFollow:</div>
          <div class="cell input">
            <input
              type="checkbox"
              name="nofollow"
              {% if blog.nofollow %}
              checked="true"
              {% endif %}
              value="true">
              {% if warnings.nofollow %}<br>
              <span class="warning">
                Your managed to mess up checking an unrequired
                checkbox. How'd you do that?</span>
              {% endif %}
          </div>
        </div>
        <div class="row">
          <div class="cell label">NoArchive:</div>
          <div class="cell input">
            <input
              type="checkbox"
              name="noarchive"
              {% if blog.noarchive %}
              checked="true"
              {% endif %}
              value="true">
              {% if warnings.noarchive %}<br>
              <span class="warning">
                Your managed to mess up checking an unrequired
                checkbox. How'd you do that?</span>
              {% endif %}
          </div>
        </div>
        <div class="row">
          <div class="cell label">NoSnippet:</div>
          <div class="cell input">
            <input type="checkbox" name="nosnippet" value="true"
              {% if blog.nosnippet %} checked="true" {% endif %}>
              {% if warnings.nosnippet %}<br>
                <span class="warning">
                  How do you mess up checking a box?</span>
              {% endif %}
          </div>
        </div>
        <div class="row">
          <div class="cell label">NoODP:</div>
          <div class="cell input">
            <input
              type="checkbox"
              class="warning"
              name="noodp"
              {% if blog.noodp %}
              checked="true"
              {% endif %}
              value="true">
              {% if warnings.noodp %}<br>
              <span class="warning">
                Your managed to mess up checking an unrequired
                checkbox. How'd you do that?</span>
              {% endif %}
          </div>
        </div>
      </div>
    </div>
    
    <!-- Display //-->
    <h3 id="display" class="animated-zippy">Display</h3>
    <div id="display-content">
      <div class="table">
        <div class="row">
          <div class="cell label">Template*:</div>
          <div class="cell input">
            <input
              class="text-input"
              type="text"
              name="template"
              value="{{blog.template}}">
              {% if warnings.template %}<br>
              <span class="warning">A template is required.</span>
              {% endif %}
          </div>
        </div>
        <div class="row">
          <div class="cell label">Logo Path:</div>
          <div class="cell input">
            <input
              class="text-input"
              type="text"
              name="logo_path"
              value="{{blog.logo_path}}">
              {% if warnings.logo_path %}<br>
              <span class="warning">Your path should be a string.</span>
              {% endif %}
            (relative to the /images in the root directory)
          </div>
        </div>
        <div class="row">
          <div class="cell label">Posts Per Page:</div>
          <div class="cell input">
            <input
              type="text"
              name="posts_per_page"
              value="{{blog.posts_per_page}}">
              {% if warnings.posts_per_page %}<br>
              <span class="warning">Please enter an integer.</span>
              {% endif %}
          </div>
        </div>
        <div class="row">
          <div class="cell label">Pages Per Page:</div>
          <div class="cell input">
            <input
              type="text"
              name="pages_per_page"
              value="{{blog.pages_per_page}}">
              {% if warnings.pages_per_page %}<br>
              <span class="warning">Please enter an integer.</span>
              {% endif %}
          </div>
        </div>
        <div class="row">
          <div class="cell label">Enable Comments:</div>
          <div class="cell input">
            <input
              type="checkbox"
              class="warning"
              name="enable_comments"
              {% if blog.enable_comments %}
              checked="true"
              {% endif %}
              value="true">
              {% if warnings.enable_comments %}<br>
              <span class="warning">
                Your managed to mess up checking an unrequired
                checkbox. How'd you do that?</span>
              {% endif %}
            (turns on login links and native commenting)
          </div>
        </div>
        <div class="row">
          <div class="cell label">Enable Page Info:</div>
          <div class="cell input">
            <input
              type="checkbox"
              class="warning"
              name="enable_pageinfo"
              {% if blog.enable_pageinfo %}
              checked="true"
              {% endif %}
              value="true">
              {% if warnings.enable_pageinfo %}<br>
              <span class="warning">
                Your managed to mess up checking an unrequired
                checkbox. How'd you do that?</span>
              {% endif %}
            (turns on summary info about pages)
          </div>
        </div>
        <div class="row">
          <div class="cell label">Enable Post Info:</div>
          <div class="cell input">
            <input
              type="checkbox"
              class="warning"
              name="enable_postinfo"
              {% if blog.enable_postinfo %}
              checked="true"
              {% endif %}
              value="true">
              {% if warnings.enable_postinfo %}<br>
              <span class="warning">
                Your managed to mess up checking an unrequired
                checkbox. How'd you do that?</span>
              {% endif %}
            (turns on summary info about posts)
          </div>
        </div>
        <div class="row">
          <div class="cell label">Display Partial Posts:</div>
          <div class="cell input">
            <input
              type="checkbox"
              name="partial_posts"
              {% if blog.partial_posts %}
              checked="true"
              {% endif %}
              value="true">
              {% if warnings.partial_posts %}<br>
              <span class="warning">
                Your managed to mess up checking an unrequired
                checkbox. How'd you do that?</span>
              {% endif %}
          </div>
        </div>
      </div>
    </div>
    
    <!-- Tools //-->
    <h3 id="tools" class="animated-zippy">Tools</h3>
    <div id="tools-content">
    <div class="table"
      <div class="row">
        <div class="cell label">Google Analytics ID:</div>
        <div class="cell input">
          <input
            class="text-input"
            type="text"
            name="google_analytics_id"
            value="{{blog.google_analytics_id}}">
            {% if warnings.google_analytics_id %}<br>
            <span class="warning">
              Your Google Analytics Web Property ID should be a
              string.</span>
            {% endif %}<br> (optional <a href="https://www.google.com/support/googleanalytics/bin/answer.py?answer=113500" target="_blank">Google Analytics Web Property ID</a> will automatically insert tracking code on site)
        </div>
      </div>
      <div class="row">
        <div class="cell label">Google CSE box:</div>
        <div class="cell input">
          <textarea
            class="textarea-med"
            name="google_cse_box">{{blog.google_cse_box}}</textarea>
            {% if warnings.google_cse_box %}<br>
            <span class="warning">This should be an HTML form.</span>
            {% endif %} 
            <div>Sign up at <a href="http://www.google.com/cse/" target="_blank">http://www.google.com/cse/</a> to get your own Google Custom Search Engine. Results page handing already built in.</div>
        </div>
      </div>
    </div>
    <!-- End Table //-->
  </div>
  <div>
            <input type="submit" name="save" value="Save">
            <input type="submit" name="done" value="Done">
            <input type="submit" name="cone" value="Cancel">
            <span class="required important">* Required</span>
        </div>
</form>
{% endblock %}
